
var target = UIATarget.localTarget();
var appWindow = target.frontMostApp().mainWindow();
var tabBar = UIATarget.localTarget().frontMostApp().mainWindow().tabBar();

var table = appWindow.tableViews()[0];
UIALogger.logMessage("going to a news story...");
var cell3 = table.cells()[3];

cell3.tap();
UIALogger.logPass("done");
UIATarget.localTarget().delay(1);

//using direct coords as that button is not nested in a way that can be easily reached without looping. 
target.tap({x:260, y:440});
// check position of fb and twitter actionsheet buttons
UIALogger.logStart("element tree for subpage"); 
target.logElementTree(); 
UIALogger.logPass("tapped share");

//facebook
target.tap({x:40,y:264}); 
target.delay(4); 
UIALogger.logStart("element tree for webView"); 
target.logElementTree(); 
UIALogger.logPass("tapped facebook");




